package finance

class User {
	
	Long id
    Long version
	String user_name
    String password
	
    static constraints = {
		user_name(size:5..15, blank:false, unique:true)
		password(size:5..15, blank:false)
    }
	
	static mapping = {
		table 'user'
        columns {
        	id column: 'user_id'
        }
	}
	
	String toString() {
		return "User: ${id}, ${user_name}"
	}
}